import React from 'react'
import { Menu } from 'antd'
import BaseMenuItem from './menuItem'
import { MenuProps } from 'antd/es/menu'

interface IProps extends MenuProps {
}

export default class BaseMenu extends React.Component<IProps> {
    public menuItemState : any
    public render() {
        this.menuItemState = [
            {
                title:'人员管理',
                key : 'person'
            },
            {
                title: '菜单管理',
                key : 'menu'
            },
            {
                title: '关于我们',
                key: 'about'
            }
        ]
        return (
           <Menu {...this.props}>
               {this.menuItemState.map((item:any,index:number)=> {
                   return (
                    <BaseMenuItem key={index} menu={item}></BaseMenuItem>
                   )
               })}
           </Menu>
        )
    }
}